  public function executeFilter(sfWebRequest $request)
  {  
    $this->setPage(1);

    if ($request->hasParameter('_reset'))
    {
      $this->setFilters($this->configuration->getFilterDefaults());

      if($request->isXmlHttpRequest()) {
        return $this->executeIndex($request);
      } else {
        $this->redirect('@<?php echo $this->getUrlForAction('list') ?>');
      }
    }
    
    if($request->hasParameter('_search')) {
        if($request->hasParameter('k')) { 
            $query = Doctrine::getTable('<?php echo $this->getSingularName() ?>')->createQuery('a')->select('*');
            foreach(Doctrine::getTable('<?php echo $this->getSingularName() ?>')->getColumnNames() as $key => $column) {
                $query->orWhere('a.'.$column.' LIKE \'%'.$request->getParameter('k').'%\'');
            }

            $pager = $this->configuration->getPager('<?php echo $this->getModuleName() ?>');
            $pager->setQuery($query);
            $pager->setPage($this->getPage());
            $pager->init();
            $this->pager = $pager;

            $this->sort = $this->getSort();
            $this->hasFilters = count($this->getUser()->getAttribute('<?php echo $this->getModuleName() ?>.filters', array(), 'admin_module')) != 0 ? true : false;

            $this->setLayout(false);
            sfConfig::set('sf_web_debug', false);
            sfProjectConfiguration::getActive()->loadHelpers(array('I18N', 'Date'));
            return $this->renderPartial('<?php echo $this->getModuleName() ?>/list', array('pager' => $this->pager, 'sort' => $this->sort, 'helper' => $this->helper));
        }
    }

    $this->filters = $this->configuration->getFilterForm($this->getFilters());

    $this->filters->bind($request->getParameter($this->filters->getName()));
    if ($this->filters->isValid())
    {
      $this->setFilters($this->filters->getValues());

      if($request->isXmlHttpRequest()) {
        return $this->executeIndex($request);
      } else {
        $this->redirect('@<?php echo $this->getUrlForAction('list') ?>');
      }
    }

    $this->pager = $this->getPager();
    $this->sort = $this->getSort();

    $this->setTemplate('index');
  }
